<?php

namespace App\Modules\Admin\Entities\Member;

use App\Models\Model;
use mysql_xdevapi\Table;

class UsersWithApparatuses extends Model
{
    protected $table = 'user_with_apparatuses';
    protected $primaryKey = 'with_id';
    public $timestamps = false;
    public function getUserApparatusByIds($user_id){
        $list = $this->where(['user_id'=>$user_id,'is_delete'=>0])->get()->toArray();
        return array_column($list,'water_role','apparatus_id');
    }
}
